package com.ruoyi.delivery.service.impl;

import com.ruoyi.delivery.domain.DelCarrierInfo;
import com.ruoyi.delivery.mapper.DelCarrierMapper;
import com.ruoyi.delivery.service.IDelCarrierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 物流商 服务层实现
 *
 * @author hu
 */
@Service
public class DelCarrierServiceImpl implements IDelCarrierService {

    @Autowired
    private DelCarrierMapper carrierMapper;

    @Override
    public List<DelCarrierInfo> getCarrierInfoList(String carrierNo, String carrierName, Integer carrierType, String carrierAddress,
                                                   String contactPhone, String contactPerson, String contactEmail, Integer activeStatus,
                                      int offset, int pageSize) {
        return carrierMapper.getCarrierInfoList(carrierNo, carrierName, carrierType, carrierAddress,
                contactPhone, contactPerson, contactEmail, activeStatus, offset, pageSize);
    }

    @Override
    public int getCarrierInfoCount(String carrierNo, String carrierName, Integer carrierType, String carrierAddress,
                                   String contactPhone, String contactPerson, String contactEmail, Integer activeStatus) {
        return carrierMapper.getCarrierInfoCount(carrierNo, carrierName, carrierType, carrierAddress,
                contactPhone, contactPerson, contactEmail, activeStatus);
    }

    @Override
    public int updateCarrierInfo(DelCarrierInfo carrierInfo) {
        return carrierMapper.updateCarrierInfo(carrierInfo);
    }

    @Override
    public int deleteCarrierInfo(String carrierNo) {
        return carrierMapper.deleteCarrierInfo(carrierNo);
    }

    @Override
    public int deleteCarriers(List<String> carrierNos) {
        return carrierMapper.deleteCarriers(carrierNos);
    }

    @Override
    public int insertCarrierInfo(DelCarrierInfo carrierInfo) {
        return carrierMapper.insertCarrierInfo(carrierInfo);
    }

    @Override
    public DelCarrierInfo getCarrierByCarrierNo(String carrierNo) {
        return carrierMapper.getCarrierByCarrierNo(carrierNo);
    }


}
